package cn.z2huo.demo.spring.webmvc.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * <p>{@link CustomWebMvcConfig} 和 {@link CustomWebMvcConfig2} 都实现自 {@link WebMvcConfigurer}
 * <p>两者是可以共存的
 *
 * @author z2huo
 */
@Configuration
@Order(10)
public class CustomWebMvcConfig2 implements WebMvcConfigurer {

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(new WebSessionMethodArgumentResolver());
    }

}
